<template>
	<view class="container">
		<!-- <view class="header">
			<text class="title">镇北盲盒</text>
		</view> -->
		<view class="bg-title">
			中奖纪录
		</view>
		<view class="bg">
			<view class="content" v-if="list.length > 0">
				<view class="recordsItem" v-for="(item,index) in list">
					<img :src="item.picture" alt="" />
					<view class="cont">
						<text>{{item.prizeName}}</text>
						<p>{{item.gainTime}}</p>
					</view>
					<image class="head" :src="item.headimg" mode=""></image>
					<view class="usercont">
						<text>{{item.userName}}</text>
					</view>
				</view>
			</view>
			<view v-else>
				<NoData></NoData>
				<view style="text-align:center;color:#fff">暂无中奖记录</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	import {
		$getStorage,
		$setStorage,
		$removeStorage
	} from "@/utils/auth.js";
	export default {
		data() {
			return {
				list: []
			};
		},
		onShow() {
			this.onRecard()
		},
		methods: {
			onRecard() {
				let issueId = $getStorage("issueId")
				this.$http('/snatchActivity/selectAllPrize', "get", {
					issueId: issueId
				}).then(res => {
					if (res.code == 200) {
						this.list = res.data
					}
				})
			}
		},
	};
</script>

<style scoped lang="scss">
	.container {
		background: linear-gradient(rgb(26, 14, 66), rgb(9, 9, 24), rgb(33, 54, 67), rgb(9, 9, 24));
		width: 100%;
		height: 1600rpx;
	}

	.header {
		padding: 30rpx 0 60rpx;
		text-align: center;

		.title {
			font-size: 39rpx;
			color: #fff;
		}
	}

	.cont {}

	.circle {
		width: 20rpx;
		height: 20rpx;
		border-radius: 50%;
		background-color: #ff5500;
	}

	.bg-title {
		background-image: url('../../static/green01.png');
		background-size: cover;
		background-repeat: no-repeat;
		width: 580rpx;
		height: 180rpx;
		line-height: 210rpx;
		display: flex;
		// align-items: center;
		justify-content: center;
		margin: auto;
		font-weight: 900;
		color: #f3d26e;
	}

	.bg {
		background-image: url('https://zzboomcos-1317756147.cos.ap-nanjing.myqcloud.com/blind-box/91151728730125701.png');
		background-size: cover;
		background-repeat: no-repeat;
		border-radius: 20rpx;
		margin: 0rpx auto 0;
		width: 85%;
		box-sizing: border-box;
		padding: 30rpx;
		height: 1200rpx;
		overflow-y: auto;
		// position: relative;


	}

	.title {
		font-size: 35rpx;
		margin-bottom: 20rpx;
	}

	.rules {
		color: #fff;
		line-height: 24px;
		margin-bottom: 20px;
		font-size: 25rpx;
		word-wrap: break-word;
		word-break: break-all;
		text-indent: 2em;
		font-weight: 900;
	}

	.giftBox {
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;

		img {
			width: 100rpx;
			height: 100rpx;
		}
	}

	.info .item {
		margin-bottom: 10px;
		color: #fff;

		p {
			font-weight: 900;
			font-size: 30rpx;
			margin-bottom: 30rpx;
			display: flex;
			align-items: center;

			view {
				margin-right: 20rpx;
			}
		}
	}

	.info .item text {
		font-size: 25rpx;
		font-weight: 900;
		word-wrap: break-word;
		word-break: break-all;
	}

	#prize {
		margin-top: 70rpx;
	}

	.prizes {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		margin-top: 20px;
	}

	.prize {
		width: 150px;
		height: 150px;
		border-radius: 8px;
		overflow: hidden;
		margin-bottom: 20px;
	}

	.button {
		background-image: url('../../static/radius.png');
		background-size: contain;
		background-repeat: no-repeat;
		width: 670rpx;
		height: 200rpx;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: -170rpx;
		font-size: 30rpx;
		font-weight: 900;

		p {
			margin-top: -20rpx;
			color: #ff5500;
		}
	}

	.prize image {
		width: 100%;
		height: 100%;
	}

	.btn {
		background-color: #f0ad4e;
		color: #fff;
		font-size: 18px;
		padding: 10px 20px;
		border-radius: 8px;
	}

	.popupBox {
		background-image: url('../../static/mask.png');
		width: 80%;
		height: 900rpx;
		background-size: contain;
		background-repeat: no-repeat;
		margin: 0 auto;
		z-index: 50;
		position: absolute;
		top: 200rpx;
		left: 10%;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 30rpx;
		box-sizing: border-box;

		.img {
			width: 200rpx;
			height: 300rpx;
			margin-top: -70rpx;
		}

		.recard {
			width: 78%;
			height: 100rpx;
			background-color: #f7e4a5;
			color: #ff5500;
			font-weight: 900;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 10rpx;
		}

		.title {
			font-size: 50rpx;
			font-weight: 900;
			color: #fff0ce;
			margin-bottom: 80rpx;
		}
	}

	.recordsItem {
		width: 100%;
		height: 130rpx;
		background: linear-gradient(45deg, rgb(52, 50, 54), rgb(72, 69, 94), rgb(28, 41, 57));
		border-radius: 30rpx;
		border: 1rpx solid rgb(101, 48, 217);
		display: flex;
		align-items: center;
		padding: 0 20rpx;
		box-sizing: border-box;
		color: #fff;
		font-size: 20rpx;
		position: relative;
		overflow: hidden;
		margin-bottom: 30rpx;

		p {
			color: #6d6d6d;
			margin-top: 15rpx;
			font-size: 18rpx;
		}

		img {
			width: 90rpx;
			height: 90rpx;
			margin-right: 20rpx;
		}

		.head {
			width: 60rpx;
			height: 60rpx;
			border-radius: 50%;
			background-color: #fff;
			margin-left: 50rpx;
			margin-right: 20rpx;
		}

		.usercont {
			font-size: 20rpx;


			text {
				color: #6d6d6d;
			}

			p {
				color: rgb(101, 48, 217);
			}
		}

		.cont {
			width: 230rpx;
		}
	}
</style>